home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 5 / BBS in a Box -Volume V (BBS in a Box) (April 1992).iso / Files / Prog / M / MPWGCC (Machines).cpt / Miscellaneous / gcc.1 < prev    next >
Encoding:
Text File  |  1990-02-21  |  33.7 KB  |  1,322 lines  |  [TEXT/MPS ]

  1. .TH GCC 1 "18 June 1989" "Version 1.36"
  2. .de BP
  3. .sp
  4. .ti -.2i
  5. \(**
  6. ..
  7. .SH NAME
  8. gcc \- GNU project C Compiler
  9. .SH SYNOPSIS
  10. .B gcc
  11. [ options ] files
  12. .SH WARNING
  13. This man page is an extract of the documentation of the
  14. .I GNU C compiler
  15. and is limited to the meaning of the options.
  16. It is updated only occasionally, because the GNU project does not use nroff.
  17. For complete, current documentation, refer to the Info file
  18. .B gcc
  19. or the DVI file
  20. .B gcc.dvi
  21. which are made from the Texinfo source file
  22. .BR gcc.texinfo .
  23. .SH DESCRIPTION
  24. The
  25. .I GNU C compiler
  26. uses a command syntax much like the Unix C compiler.
  27. The
  28. .I gcc
  29. program accepts options and file names as operands.
  30. Multiple single-letter options may
  31. .I not
  32. be grouped:
  33. .B \-dr
  34. is very different from
  35. .BR "\-d \-r" .
  36. .P
  37. When you invoke GNU CC, it normally does preprocessing, compilation,
  38. assembly and linking.
  39. File names which end in
  40. .B .c
  41. are taken as C source to be preprocessed and compiled;
  42. file names ending in
  43. .B .i
  44. are taken as preprocessor output to be compiled;
  45. compiler output files plus any input files with names ending in
  46. .B .s
  47. are assembled;
  48. then the resulting object files, plus any other input files,
  49. are linked together to produce an executable.
  50. .P
  51. Command options allow you to stop this process at an intermediate stage.
  52. For example, the 
  53. .B \-c
  54. option says not to run the linker.
  55. Then the output consists of object files output by the assembler.
  56. .P
  57. Other command options are passed on to one stage of processing.
  58. Some options control the preprocessor and others the compiler itself.
  59. Yet other options control the assembler and linker;
  60. these are not documented here, but you rarely need to use any of them.
  61. .SH OPTIONS
  62. Here are the options to control the overall compilation process,
  63. including those that say whether to link, whether to assemble, and so on.
  64. .TP
  65. .BI \-o " file"
  66. Place output in file
  67. .IR file .
  68. This applies regardless to whatever sort of output is being produced,
  69. whether it be an executable file, an object file,
  70. an assembler file or preprocessed C code.
  71. .sp
  72. If 
  73. .B \-o
  74. is not specified, the default is to put an executable file in
  75. .BR a.out ,
  76. the object file
  77. .IB source .c
  78. in
  79. .IB source .o\fR,
  80. an assembler file in
  81. .IB source .s\fR,
  82. and preprocessed C on standard output.
  83. .TP
  84. .B \-c
  85. Compile or assemble the source files, but do not link.
  86. Produce object files with names made by replacing
  87. .B .c
  88. or
  89. .B .s
  90. with
  91. .B .o
  92. at the end of the input file names.
  93. Do nothing at all for object files specified as input.
  94. .TP
  95. .B \-S
  96. Compile into assembler code but do not assemble.
  97. The assembler output file name is made by replacing
  98. .B .c
  99. with
  100. .B .s
  101. at the end of the input file name.
  102. Do nothing at all for assembler source files or
  103. object files specified as input.
  104. .TP
  105. .B \-E
  106. Run only the C preprocessor.
  107. Preprocess all the C source files specified and output
  108. the results to standard output.
  109. .TP
  110. .B \-v
  111. Compiler driver program prints the commands it executes as it runs
  112. the preprocessor, compiler proper, assembler and linker.
  113. Some of these are directed to print their own version numbers.
  114. .TP
  115. .B \-pipe
  116. Use pipes rather than temporary files for communication between the
  117. various stages of compilation.
  118. This fails to work on some systems where the assembler is unable
  119. to read from a pipe; but the GNU assembler has no trouble.
  120. .TP
  121. .BI \-B prefix
  122. Compiler driver program tries
  123. .I prefix
  124. as a prefix for each program it tries to run.
  125. These programs are
  126. .IR cpp ,
  127. .IR cc1 ,
  128. .I as
  129. and
  130. .IR ld .
  131. .sp
  132. For each subprogram to be run, the compiler driver first tries the
  133. .B \-B
  134. prefix, if any.
  135. If that name is not found, or if
  136. .B \-B
  137. was not specified, the driver tries two standard prefixes, which are
  138. .B /usr/lib/gcc-
  139. and
  140. .BR /usr/local/lib/gcc- .
  141. If neither of those results in a file name that is found, the
  142. unmodified program name is searched for using the directories
  143. specified in your
  144. .B PATH
  145. environment variable.
  146. .sp
  147. The run-time support file
  148. .B gnulib
  149. is also searched for using the
  150. .B \-B
  151. prefix, if needed.
  152. If it is not found there, the two standard prefixes above
  153. are tried, and that is all.
  154. The file is left out of the link if it is not found by those means.
  155. Most of the time, on most machines, you can do without it.
  156. .sp
  157. You can get a similar result from the environment variable
  158. .BR GCC_EXEC_PREFIX ;
  159. if it is defined, its value is used as a prefix in the same way.
  160. If both the
  161. .B \-B
  162. option and the
  163. .B GCC_EXEC_PREFIX
  164. variable are present, the
  165. .B \-B
  166. option is used first and the environment variable value second.
  167. .TP
  168. .BI -b prefix
  169. The argument
  170. .I prefix
  171. is used as a second prefix for the compiler executables and libraries.
  172. This prefix is optional: the compiler tries each file first with it,
  173. then without it.
  174. This prefix follows the prefix specified with
  175. .B \-B
  176. or the default prefixes.
  177. .sp
  178. Thus,
  179. .B \-bvax- \-Bcc/
  180. in the presence of environment variable
  181. .B GCC_EXEC_PREFIX
  182. with definition
  183. .B /u/foo/
  184. causes GNU CC to try the following file names for the preprocessor executable:
  185. .sp
  186.     \fBcc/vax-cpp
  187. .br
  188.     cc/cpp
  189. .br
  190.     /u/foo/vax-cpp
  191. .br
  192.     /u/foo/cpp
  193. .br
  194.     /usr/local/lib/gcc-vax-cpp
  195. .br
  196.     /usr/local/lib/gcc-cpp
  197. .br
  198.     /usr/lib/gcc-vax-cpp
  199. .br
  200.     /usr/lib/gcc-cpp\fR
  201. .P
  202. These options control the details of C compilation itself.
  203. .TP
  204. .B \-ansi
  205. Support all ANSI standard C programs.
  206. .sp
  207. This turns off certain features of GNU C that are incompatible with
  208. ANSI C, such as the
  209. .BR asm ,
  210. .B inline
  211. and
  212. .B typeof
  213. keywords, and predefined macros such as
  214. .B unix
  215. and
  216. .B vax
  217. that identify the type of system you are using.
  218. It also enables the undesirable and rarely used ANSI trigraph feature.
  219. .sp
  220. The alternate keywords
  221. .BR __asm__ ,
  222. .B __inline__
  223. and
  224. .B __typeof__
  225. continue to work despite
  226. .BR \-ansi .
  227. You would not want to use them in an ANSI C program, of course,
  228. but it useful to put them in header files that might be included
  229. in compilations done with
  230. .BR \-ansi .
  231. Alternate predefined macros such as
  232. .B __unix__
  233. and
  234. .B __vax__
  235. are also available, with or without
  236. .BR \-ansi .
  237. .sp
  238. The
  239. .B \-ansi
  240. option does not cause non-ANSI programs to be rejected gratuitously.
  241. For that,
  242. .B \-pedantic
  243. is required in addition to
  244. .BR \-ansi .
  245. .sp
  246. The macro 
  247. .B __STRICT_ANSI__
  248. is predefined when the
  249. .B \-ansi
  250. option is used.
  251. Some header files may notice this macro and refrain from declaring
  252. certain functions or defining certain macros that the ANSI standard
  253. doesn't call for; this is to avoid interfering with any programs
  254. that might use these names for other things.
  255. .TP
  256. .B \-traditional
  257. Attempt to support some aspects of traditional C compilers.
  258. Specifically:
  259. .BP
  260. All
  261. .B extern
  262. declarations take effect globally even if they are
  263. written inside of a function definition.
  264. This includes implicit declarations of functions.
  265. .BP
  266. The keywords
  267. .BR typeof ,
  268. .BR inline ,
  269. .BR signed ,
  270. .B const
  271. and
  272. .B volatile
  273. are not recognized.
  274. .BP
  275. Comparisons between pointers and integers are always allowed.
  276. .BP
  277. Integer types
  278. .B "unsigned short"
  279. and
  280. .B "unsigned char"
  281. promote to
  282. .BR "unsigned int" .
  283. .BP
  284. Out-of-range floating point literals are not an error.
  285. .BP
  286. All automatic variables not declared
  287. .B register
  288. are preserved by
  289. .IR longjmp (3C).
  290. Ordinarily, GNU C follows ANSI C: automatic variables not declared
  291. .B volatile
  292. may be clobbered.
  293. .BP
  294. In the preprocessor, comments convert to nothing at all,
  295. rather than to a space.
  296. This allows traditional token concatenation.
  297. .BP
  298. In the preprocessor, macro arguments are recognized within string
  299. constants in a macro definition (and their values are stringified, though
  300. without additional quote marks, when they appear in such a context).
  301. The preprocessor always considers a string constant to end at a newline.
  302. .BP
  303. The predefined macro
  304. .B __STDC__
  305. is not defined when you use
  306. .BR \-traditional ,
  307. but
  308. .B __GNUC__
  309. is (since the GNU extensions which
  310. .B __GNUC__
  311. indicates are not affected by
  312. .BR \-traditional ).
  313. If you need to write header files that work differently depending on whether
  314. .B \-traditional
  315. is in use, by testing both of these predefined macros you can distinguish
  316. four situations: GNU C, traditional GNU C, other ANSI C compilers, and
  317. other old C compilers.
  318. .TP
  319. .B \-O
  320. Optimize.
  321. Optimizing compilation takes somewhat more time,
  322. and a lot more memory for a large function.
  323. .sp
  324. Without
  325. .BR \-O ,
  326. the compiler's goal is to reduce the cost of compilation and
  327. to make debugging produce the expected results.
  328. Statements are independent: if you stop the program with a breakpoint
  329. between statements, you can then assign a new value to any variable or
  330. change the program counter to any other statement in the function and
  331. get exactly the results you would expect from the source code.
  332. .sp
  333. Without
  334. .BR \-O ,
  335. only variables declared
  336. .B register
  337. are allocated in registers.
  338. The resulting compiled code is a little worse than produced by PCC without
  339. .BR \-O .
  340. .sp
  341. With
  342. .BR \-O ,
  343. the compiler tries to reduce code size and execution time.
  344. .sp
  345. Some of the
  346. .B \-f
  347. options described below turn specific kinds of optimization on or off.
  348. .TP
  349. .B \-g
  350. Produce debugging information in the operating system's
  351. native format (for DBX or SDB).
  352. GDB also can work with this debugging information.
  353. .sp
  354. Unlike most other C compilers, GNU CC allows you to use
  355. .B \-g
  356. with
  357. .BR \-O .
  358. The shortcuts taken by optimized code may occasionally
  359. produce surprising results: some variables you declared may not exist
  360. at all; flow of control may briefly move where you did not expect it;
  361. some statements may not be executed because they compute constant
  362. results or their values were already at hand; some statements may
  363. execute in different places because they were moved out of loops.
  364. Nevertheless it proves possible to debug optimized output.
  365. This makes it reasonable to use the optimizer for programs
  366. that might have bugs.
  367. .TP
  368. .B \-gg
  369. Produce debugging information in GDB's own format.
  370. This requires the GNU assembler and linker in order to work.
  371. .sp
  372. This feature will probably be eliminated.
  373. It was intended to enable GDB to read the symbol table faster,
  374. but it doesn't result in enough of a speedup to be worth the
  375. larger object files and executables.
  376. We are working on other ways of making GDB start even faster,
  377. which work with DBX format debugging information and could be
  378. made to work with SDB format.
  379. .TP
  380. .B \-w
  381. Inhibit all warning messages.
  382. .TP
  383. .B \-W
  384. Print extra warning messages for these events:
  385. .BP
  386. An automatic variable is used without first being initialized.
  387. .sp
  388. These warnings are possible only in optimizing compilation,
  389. because they require data flow information that is computed only
  390. when optimizing.
  391. If you don't specify
  392. .BR \-O ,
  393. you simply won't get these warnings.
  394. .sp
  395. These warnings occur only for variables that are candidates for
  396. register allocation.
  397. Therefore, they do not occur for a variable that is declared
  398. .BR volatile ,
  399. or whose address is taken, or whose size is other than 1, 2, 4 or 8 bytes.
  400. Also, they do not occur for structures, unions or arrays, even when
  401. they are in registers.
  402. .sp
  403. Note that there may be no warning about a variable that is used only
  404. to compute a value that itself is never used, because such
  405. computations may be deleted by data flow analysis before the warnings
  406. are printed.
  407. .sp
  408. These warnings are made optional because GNU CC is not smart
  409. enough to see all the reasons why the code might be correct
  410. despite appearing to have an error.
  411. Here is one example of how this can happen:
  412. .sp
  413.     {
  414. .br
  415.     \ \ int x;
  416. .br
  417.     \ \ switch (y)
  418. .br
  419.     \ \ \ \ {
  420. .br
  421.     \ \ \ \ case 1: x = 1;
  422. .br
  423.     \ \ \ \ \ \ break;
  424. .br
  425.     \ \ \ \ case 2: x = 4;
  426. .br
  427.     \ \ \ \ \ \ break;
  428. .br
  429.     \ \ \ \ case 3: x = 5;
  430. .br
  431.     \ \ \ \ }
  432. .br
  433.     \ \ foo (x);
  434. .br
  435.     }
  436. .sp
  437. If the value of 
  438. .I y
  439. is always 1, 2 or 3, then
  440. .I x
  441. is always initialized, but GNU CC doesn't know this.
  442. Here is another common case:
  443. .sp
  444.     {
  445. .br
  446.     \ \ int save_y;
  447. .br
  448.     \ \ if (change_y) save_y = y, y = new_y;
  449. .br
  450.     \ \ ...
  451. .br
  452.     \ \ if (change_y) y = save_y;
  453. .br
  454.     }
  455. .sp
  456. This has no bug because
  457. .I save_y
  458. is used only if it is set.
  459. .sp
  460. Some spurious warnings can be avoided if you declare as
  461. .B volatile
  462. all the functions you use that never return.
  463. .BP
  464. A nonvolatile automatic variable might be changed by a call to
  465. .IR longjmp (3C).
  466. These warnings as well are possible only in optimizing compilation.
  467. .sp
  468. The compiler sees only the calls to
  469. .IR setjmp (3C).
  470. It cannot know where
  471. .IR longjmp (3C)
  472. will be called; in fact, a signal handler could
  473. call it at any point in the code.
  474. As a result, you may get a warning even when there is
  475. in fact no problem because
  476. .IR longjmp (3C)
  477. cannot in fact be called at the place which would cause a problem.
  478. .BP
  479. A function can return either with or without a value.
  480. (Falling off the end of the function body is considered returning without
  481. a value.)
  482. For example, this function would evoke such a warning:
  483. .sp
  484.     foo (a)
  485. .br
  486.     {
  487. .br
  488.     \ \ if (a > 0)
  489. .br
  490.     \ \ \ \ return a;
  491. .br
  492.     }
  493. .sp
  494. Spurious warnings can occur because GNU CC does not realize that
  495. certain functions (including
  496. .IR abort (3C)
  497. and 
  498. .IR longjmp (3C))
  499. will never return.
  500. .BP
  501. An expression-statement contains no side effects.
  502. .sp
  503. In the future, other useful warnings may also be enabled by this option.
  504. .TP
  505. .B \-Wimplicit
  506. Warn whenever a function is implicitly declared.
  507. .TP
  508. .B \-Wreturn-type
  509. Warn whenever a function is defined with a return-type that defaults to
  510. .BR int .
  511. Also warn about any
  512. .B return
  513. statement with no return-value in a function whose return-type is not
  514. .BR void .
  515. .TP
  516. .B \-Wunused
  517. Warn whenever a local variable is unused aside from its declaration,
  518. and whenever a function is declared static but never defined.
  519. .TP
  520. .B \-Wswitch
  521. Warn whenever a
  522. .B switch
  523. statement has an index of enumeral type and lacks a
  524. .B case
  525. for one or more of the named codes of that enumeration.
  526. (The presence of a
  527. .B default
  528. label prevents this warning.)
  529. .B case
  530. labels outside the enumeration range also provoke
  531. warnings when this option is used.
  532. .TP
  533. .B \-Wcomment
  534. Warn whenever a comment-start sequence
  535. .B /\(**
  536. appears in a comment.
  537. .TP
  538. .B \-Wtrigraphs
  539. Warn if any trigraphs are encountered (assuming they are enabled).
  540. .TP
  541. .B \-Wall
  542. All of the above 
  543. .B \-W
  544. options combined.
  545. These are all the options which pertain to usage that we do not recommend and
  546. that we believe is always easy to avoid, even in conjunction with macros.
  547. .sp 
  548. The other
  549. .BR \-W ...
  550. options below are not implied by
  551. .B \-Wall
  552. because certain kinds of useful macros are almost impossible to write
  553. without causing those warnings.
  554. .TP
  555. .B \-Wshadow
  556. Warn whenever a local variable shadows another local variable.
  557. .TP
  558. .BI \-Wid-clash- len
  559. Warn whenever two distinct identifiers match in the first
  560. .I len
  561. characters.
  562. This may help you prepare a program that will compile with certain obsolete,
  563. brain-damaged compilers.
  564. .TP
  565. .B \-Wpointer-arith
  566. Warn about anything that depends on the size of a function type or of
  567. .BR void .
  568. GNU C assigns these types a size of 1, for convenience in calculations with
  569. .B void \(**
  570. pointers and pointers to functions.
  571. .TP
  572. .B \-Wcast-qual
  573. Warn whenever a pointer is cast so as to remove a type qualifier from
  574. the target type.
  575. For example, warn if a 
  576. .B const char \(**
  577. is cast to an ordinary
  578. .BR "char \(**" .
  579. .TP
  580. .B \-Wwrite-strings
  581. Give string constants the type
  582. .B const char[\fIlength\fB]
  583. so that copying the address of one into a
  584. .RB non- "const char \(**"
  585. pointer will get a warning.
  586. These warnings will help you find at compile time
  587. code that can try to write into a string constant,
  588. but only if you have been very careful about using
  589. .B const
  590. in declarations and prototypes.
  591. Otherwise, it will just be a nuisance; this is why we did not make
  592. .B \-Wall
  593. request these warnings.
  594. .TP
  595. .B \-p
  596. Generate extra code to write profile information suitable
  597. for the analysis program
  598. .IR prof (1).
  599. .TP
  600. .B \-pg
  601. Generate extra code to write profile information suitable for the
  602. analysis program
  603. .IR gprof (1).
  604. .TP
  605. .B \-a
  606. Generate extra code to write profile information for basic blocks,
  607. suitable for the analysis program
  608. .IR tcov (1).
  609. Eventually GNU
  610. .IR gprof (1)
  611. should be extended to process this data.
  612. .TP
  613. .BI \-l library
  614. Search a standard list of directories for a library named
  615. .IR library ,
  616. which is actually a file named
  617. .BR lib\fIlibrary\fB.a .
  618. The linker uses this file as if it had been specified precisely by name.
  619. .sp
  620. The directories searched include several standard system directories
  621. plus any that you specify with
  622. .BR \-L .
  623. .sp
  624. Normally the files found this way are library files--archive files
  625. whose members are object files.
  626. The linker handles an archive file by scanning through it for members
  627. which define symbols that have so far been referenced but not defined.
  628. But if the file that is found is an ordinary object file, it is linked
  629. in the usual fashion.
  630. The only difference between using an
  631. .B \-l
  632. option and specifying a file name is that
  633. .B \-l
  634. searches several directories.
  635. .TP
  636. .BI \-L dir
  637. Add directory
  638. .I dir
  639. to the list of directories to be searched for
  640. .BR \-l .
  641. .TP
  642. .B \-nostdlib
  643. Don't use the standard system libraries and startup files when linking.
  644. Only the files you specify (plus 
  645. .BR gnulib )
  646. will be passed to the linker.
  647. .TP
  648. .BI \-m machinespec
  649. Machine-dependent option specifying something about the type of target machine.
  650. These options are defined by the macro
  651. .B TARGET_SWITCHES
  652. in the machine description.
  653. The default for the options is also defined by that macro,
  654. which enables you to change the defaults.
  655. .sp
  656. These are the
  657. .B \-m
  658. options defined in the 68000 machine description:
  659. .sp
  660. .B \-m68020
  661. .br
  662. .B \-mc68020
  663. .in +.5i
  664. Generate output for a 68020 (rather than a 68000).
  665. This is the default if you use the unmodified sources.
  666. .in -.5i
  667. .sp
  668. .B \-m68000
  669. .br
  670. .B \-mc68000
  671. .in +.5i
  672. Generate output for a 68000 (rather than a 68020).
  673. .in -.5i
  674. .sp
  675. .B \-m68881
  676. .in +.5i
  677. Generate output containing 68881 instructions for floating point.
  678. This is the default if you use the unmodified sources.
  679. .in -.5i
  680. .sp
  681. .B \-mfpa
  682. .in +.5i
  683. Generate output containing Sun FPA instructions for floating point.
  684. .in -.5i
  685. .sp
  686. .B \-msoft-float
  687. .in +.5i
  688. Generate output containing library calls for floating point.
  689. .in -.5i
  690. .sp
  691. .B \-mshort
  692. .in +.5i
  693. Consider type
  694. .B int
  695. to be 16 bits wide, like
  696. .BR "short int" .
  697. .in -.5i
  698. .sp
  699. .B \-mnobitfield
  700. .in +.5i
  701. Do not use the bit-field instructions.
  702. .B \-m68000
  703. implies
  704. .BR \-mnobitfield .
  705. .in -.5i
  706. .sp
  707. .B \-mbitfield
  708. .in +.5i
  709. Do use the bit-field instructions.
  710. .B \-m68020
  711. implies
  712. .BR \-mbitfield .
  713. This is the default if you use the unmodified sources.
  714. .in -.5i
  715. .sp
  716. .B \-mrtd
  717. .in +.5i
  718. Use a different function-calling convention, in which functions
  719. that take a fixed number of arguments return with the
  720. .B rtd
  721. instruction, which pops their arguments while returning.
  722. This saves one instruction in the caller since there is no need to pop
  723. the arguments there.
  724. .sp
  725. This calling convention is incompatible with the one normally
  726. used on Unix, so you cannot use it if you need to call libraries
  727. compiled with the Unix compiler.
  728. .sp
  729. Also, you must provide function prototypes for all functions that
  730. take variable numbers of arguments (including 
  731. .BR printf (3S));
  732. otherwise incorrect code will be generated for calls to those functions.
  733. .sp
  734. In addition, seriously incorrect code will result if you call a
  735. function with too many arguments.
  736. (Normally, extra arguments are harmlessly ignored.)
  737. .sp
  738. The
  739. .B rtd
  740. instruction is supported by the 68010 and 68020 processors,
  741. but not by the 68000.
  742. .in -.5i
  743. .sp
  744. These
  745. .B \-m
  746. options are defined in the Vax machine description:
  747. .sp
  748. .B \-munix
  749. .in +.5i
  750. Do not output certain jump instructions 
  751. .RB ( aobleq
  752. and so on) that the Unix assembler for the Vax
  753. cannot handle across long ranges.
  754. .in -.5i
  755. .sp
  756. .B \-mgnu
  757. .in +.5i
  758. Do output those jump instructions, on the assumption that you
  759. will assemble with the GNU assembler.
  760. .in -.5i
  761. .sp
  762. .B \-mg
  763. .in +.5i
  764. Output code for g-format floating point numbers instead of d-format.
  765. .in -.5i
  766. .sp
  767. These
  768. .B \-m
  769. switches are supported on the Sparc:
  770. .sp
  771. .B \-mfpu
  772. .in +.5i
  773. Generate output containing floating point instructions.
  774. This is the default if you use the unmodified sources.
  775. .in -.5i
  776. .sp
  777. .B \-msoft-float
  778. .in +.5i
  779. Generate output containing library calls for floating point.
  780. .in -.5i
  781. .sp
  782. .B \-mno-epilogue
  783. .in +.5i
  784. Generate separate return instructions for
  785. .B return
  786. statements.
  787. This has both advantages and disadvantages; I don't recall what they are.
  788. .in -.5i
  789. .sp
  790. These
  791. .B \-m
  792. options are defined in the Convex machine description:
  793. .sp
  794. .B \-mc1
  795. .in +.5i
  796. Generate output for a C1.
  797. This is the default when the compiler is configured for a C1.
  798. .in -.5i
  799. .sp
  800. .B \-mc2
  801. .in +.5i
  802. Generate output for a C2.
  803. This is the default when the compiler is configured for a C2.
  804. .in -.5i
  805. .sp
  806. .B \-margcount
  807. .in +.5i
  808. Generate code which puts an argument count in the word preceding each
  809. argument list.
  810. Some nonportable Convex and Vax programs need this word.
  811. (Debuggers don't; this info is in the symbol table.)
  812. .in -.5i
  813. .sp
  814. .B \-mnoargcount
  815. .in +.5i
  816. Omit the argument count word.
  817. This is the default if you use the unmodified sources.
  818. .in -.5i
  819. .TP
  820. .BI \-f flag
  821. Specify machine-independent flags.
  822. Most flags have both positive and negative forms; the negative form of
  823. .B \-ffoo
  824. would be
  825. .BR \-fno-foo .
  826. In the table below, only one of the forms is listed--the one which
  827. is not the default.
  828. You can figure out the other form by either removing
  829. .B no-
  830. or adding it.
  831. .TP
  832. .B \-fpcc-struct-return
  833. Use the same convention for returning
  834. .B struct
  835. and
  836. .B union
  837. values that is used by the usual C compiler on your system.
  838. This convention is less efficient for small structures, and on many
  839. machines it fails to be reentrant; but it has the advantage of allowing
  840. intercallability between GCC-compiled code and PCC-compiled code.
  841. .TP
  842. .B \-ffloat-store
  843. Do not store floating-point variables in registers.
  844. This prevents undesirable excess precision on machines such as the
  845. 68000 where the floating registers (of the 68881) keep more
  846. precision than a 
  847. .B double
  848. is supposed to have.
  849. .sp
  850. For most programs, the excess precision does only good, but a few
  851. programs rely on the precise definition of IEEE floating point.
  852. Use
  853. .B \-ffloat-store
  854. for such programs.
  855. .TP
  856. .B \-fno-asm
  857. Do not recognize
  858. .BR asm ,
  859. .B inline
  860. or
  861. .B typeof
  862. as a keyword.
  863. These words may then be used as identifiers.
  864. You can use
  865. .BR __asm__ ,
  866. .B __inline__
  867. and
  868. .B __typeof__
  869. instead.
  870. .TP
  871. .B \-fno-defer-pop
  872. Always pop the arguments to each function call as soon as that
  873. function returns.
  874. Normally the compiler (when optimizing) lets arguments accumulate
  875. on the stack for several function calls and pops them all at once.
  876. .TP
  877. .B \-fstrength-reduce
  878. Perform the optimizations of loop strength reduction and
  879. elimination of iteration variables.
  880. .TP
  881. .B \-fcombine-regs
  882. Allow the combine pass to combine an instruction that copies one
  883. register into another.
  884. This might or might not produce better code when used in addition to
  885. .BR \-O .
  886. I am interested in hearing about the difference this makes.
  887. .TP
  888. .B \-fforce-mem
  889. Force memory operands to be copied into registers before doing
  890. arithmetic on them.
  891. This may produce better code by making all memory references
  892. potential common subexpressions.
  893. When they are not common subexpressions, instruction combination should
  894. eliminate the separate register-load.
  895. I am interested in hearing about the difference this makes.
  896. .TP
  897. .B \-fforce-addr
  898. Force memory address constants to be copied into registers before
  899. doing arithmetic on them.
  900. This may produce better code just as
  901. .B \-fforce-mem
  902. may.
  903. I am interested in hearing about the difference this makes.
  904. .TP
  905. .B \-fomit-frame-pointer
  906. Don't keep the frame pointer in a register for functions that
  907. don't need one.
  908. This avoids the instructions to save, set up and restore frame pointers;
  909. it also makes an extra register available in many functions.
  910. .B "It also makes debugging impossible."
  911. .sp
  912. On some machines, such as the Vax, this flag has no effect, because
  913. the standard calling sequence automatically handles the frame pointer
  914. and nothing is saved by pretending it doesn't exist.
  915. The machine-description macro
  916. .B FRAME_POINTER_REQUIRED
  917. controls whether a target machine supports this flag.
  918. .TP
  919. .B \-finline-functions
  920. Integrate all simple functions into their callers.
  921. The compiler heuristically decides which functions are simple
  922. enough to be worth integrating in this way.
  923. .sp
  924. If all calls to a given function are integrated, and the function is declared
  925. .BR static ,
  926. then the function is normally not output as assembler code in its own right.
  927. .TP
  928. .B \-fcaller-saves
  929. Enable values to be allocated in registers that will be clobbered by
  930. function calls, by emitting extra instructions to save and restore the
  931. registers around such calls.
  932. Such allocation is done only when it seems to result in better code than
  933. would otherwise be produced.
  934. .sp
  935. This option is enabled by default on certain machines, usually those
  936. which have no call-preserved registers to use instead.
  937. .TP
  938. .B \-fkeep-inline-functions
  939. Even if all calls to a given function are integrated, and the function is
  940. declared
  941. .BR static ,
  942. nevertheless output a separate run-time callable version of the function.
  943. .TP
  944. .B \-fwritable-strings
  945. Store string constants in the writable data segment and don't uniquize them.
  946. This is for compatibility with old programs which assume they can write
  947. into string constants.
  948. Writing into string constants is a very bad idea;
  949. constants should be constant.
  950. .TP
  951. .B \-fcond-mismatch
  952. Allow conditional expressions with mismatched types in the second and
  953. third arguments.
  954. The value of such an expression is void.
  955. .TP
  956. .B \-fno-function-cse
  957. Do not put function addresses in registers; make each instruction that
  958. calls a constant function contain the function's address explicitly.
  959. .sp
  960. This option results in less efficient code, but some strange hacks that
  961. alter the assembler output may be confused by the optimizations performed
  962. when this option is not used.
  963. .TP
  964. .B \-fvolatile
  965. Consider all memory references through pointers to be volatile.
  966. .TP
  967. .B \-fshared-data
  968. Requests that the data and
  969. .RB non- const
  970. variables of this compilation be shared data rather than private data.
  971. The distinction makes sense only on certain operating systems, where
  972. shared data is shared between processes running the same program, while
  973. private data exists in one copy per process.
  974. .TP
  975. .B \-funsigned-char
  976. Let the type
  977. .B char
  978. be the unsigned, like
  979. .BR "unsigned char" .
  980. .sp
  981. Each kind of machine has a default for what
  982. .B char
  983. should be.
  984. It is either like
  985. .B "unsigned char"
  986. by default or like
  987. .B "signed char"
  988. by default.
  989. (Actually, at present, the default is always signed.)
  990. .sp
  991. The type
  992. .B char
  993. is always a distinct type from either
  994. .B "signed char"
  995. or
  996. .BR "unsigned char" ,
  997. even though its behavior is always just like one of those two.
  998. .sp
  999. Note that this is equivalent to
  1000. .BR \-fno-signed-char ,
  1001. which is the negative form of
  1002. .BR \-fsigned-char .
  1003. .TP
  1004. .B \-fsigned-char
  1005. Let the type
  1006. .B char
  1007. be signed, like
  1008. .BR "signed char" .
  1009. .sp
  1010. Note that this is equivalent to
  1011. .BR \-fno-unsigned-char ,
  1012. which is the negative form of
  1013. .BR \-funsigned-char .
  1014. .TP
  1015. .B \-fdelayed-branch
  1016. If supported for the target machine, attempt to reorder instructions to
  1017. exploit instruction slots available after delayed branch instructions.
  1018. .TP
  1019. .BI \-ffixed- reg
  1020. Treat the register named
  1021. .I reg
  1022. as a fixed register; generated code should never refer to it
  1023. (except perhaps as a stack pointer, frame pointer or in some other fixed role).
  1024. .sp
  1025. .I reg
  1026. must be the name of a register.
  1027. The register names accepted are machine-specific and are defined in the
  1028. .B REGISTER_NAMES
  1029. macro in the machine description macro file.
  1030. .sp
  1031. This flag does not have a negative form, because it specifies a
  1032. three-way choice.
  1033. .TP
  1034. .BI \-fcall-used- reg
  1035. Treat the register named
  1036. .I reg
  1037. as an allocatable register that is clobbered by function calls.
  1038. It may be allocated for temporaries or variables that do not live
  1039. across a call.
  1040. Functions compiled this way will not save and restore the register REG.
  1041. .sp
  1042. Use of this flag for a register that has a fixed pervasive role
  1043. in the machine's execution model, such as the stack pointer or
  1044. frame pointer, will produce disastrous results.
  1045. .sp
  1046. This flag does not have a negative form, because it specifies a
  1047. three-way choice.
  1048. .TP
  1049. .BI \-fcall-saved- reg
  1050. Treat the register named
  1051. .I reg
  1052. as an allocatable register saved by functions.
  1053. It may be allocated even for temporaries or variables that live across a call.
  1054. Functions compiled this way will save and restore the register
  1055. .I reg
  1056. if they use it.
  1057. .sp
  1058. Use of this flag for a register that has a fixed pervasive role
  1059. in the machine's execution model, such as the stack pointer or
  1060. frame pointer, will produce disastrous results.
  1061. .sp
  1062. A different sort of disaster will result from the use of this
  1063. flag for a register in which function values may be returned.
  1064. .sp
  1065. This flag does not have a negative form, because it specifies a
  1066. three-way choice.
  1067. .TP
  1068. .BI \-d letters
  1069. Says to make debugging dumps at times specified by
  1070. .IR letters .
  1071. Here are the possible letters:
  1072. .sp
  1073. .B r
  1074. .in +.5i
  1075. Dump after RTL generation.
  1076. .in -.5i
  1077. .B j
  1078. .in +.5i
  1079. Dump after first jump optimization.
  1080. .in -.5i
  1081. .B J
  1082. .in +.5i
  1083. Dump after last jump optimization.
  1084. .in -.5i
  1085. .B s
  1086. .in +.5i
  1087. Dump after CSE (including the jump optimization that sometimes follows CSE).
  1088. .in -.5i
  1089. .B L
  1090. .in +.5i
  1091. Dump after loop optimization.
  1092. .in -.5i
  1093. .B f
  1094. .in +.5i
  1095. Dump after flow analysis.
  1096. .in -.5i
  1097. .B c
  1098. .in +.5i
  1099. Dump after instruction combination.
  1100. .in -.5i
  1101. .B l
  1102. .in +.5i
  1103. Dump after local register allocation.
  1104. .in -.5i
  1105. .B g
  1106. .in +.5i
  1107. Dump after global register allocation.
  1108. .in -.5i
  1109. .B d
  1110. .in +.5i
  1111. Dump after delayed branch scheduling.
  1112. .in -.5i
  1113. .B m
  1114. .in +.5i
  1115. Print statistics on memory usage, at the end of the run.
  1116. .in -.5i
  1117. .TP
  1118. .B \-pedantic
  1119. Issue all the warnings demanded by strict ANSI standard C; reject
  1120. all programs that use forbidden extensions.
  1121. .sp
  1122. Valid ANSI standard C programs should compile properly with or without
  1123. this option (though a rare few will require
  1124. .BR \-ansi ).
  1125. However, without this option, certain GNU extensions and traditional C
  1126. features are supported as well.
  1127. With this option, they are rejected.
  1128. There is no reason to use this option; it exists only to satisfy pedants.
  1129. .sp
  1130. .B \-pedantic
  1131. does not cause warning messages for use of the alternate keywords whose
  1132. names begin and end with
  1133. .BR __ .
  1134. .TP
  1135. .B \-static
  1136. On Suns running version 4, this prevents linking with the shared
  1137. libraries.
  1138. .RB ( \-g
  1139. has the same effect.)
  1140. .P
  1141. These options control the C preprocessor, which is run on each C source
  1142. file before actual compilation.  If you use the `-E' option, nothing
  1143. is done except C preprocessing.  Some of these options make sense only
  1144. together with `-E' because they request preprocessor output that is
  1145. not suitable for actual compilation.
  1146. .TP
  1147. .B \-C
  1148. Tell the preprocessor not to discard comments.
  1149. Used with the
  1150. .B \-E
  1151. option.
  1152. .TP
  1153. .BI \-I dir
  1154. Search directory
  1155. .I dir
  1156. for include files.
  1157. .TP
  1158. .B \-I-
  1159. Any directories specified with
  1160. .B \-I
  1161. options before the
  1162. .B \-I-
  1163. option are searched only for the case of
  1164. .B #include
  1165. \fB"\fIfile\fB"\fR; they are not searched for
  1166. .BR "#include <\fIfile\fB>" .
  1167. .sp
  1168. If additional directories are specified with
  1169. .B \-I
  1170. options after the
  1171. .BR \-I- ,
  1172. these directories are searched for all
  1173. .B #include
  1174. directives.
  1175. (Ordinarily
  1176. .I all
  1177. .B \-I
  1178. directories are used this way.)
  1179. .sp
  1180. In addition, the
  1181. .B \-I-
  1182. option inhibits the use of the current directory as the first
  1183. search directory for
  1184. .B #include
  1185. \fB"\fIfile\fB"\fR.
  1186. Therefore, the current directory is searched only if it is requested
  1187. explicitly with
  1188. .BR \-I. .
  1189. Specifying both
  1190. .B \-I-
  1191. and
  1192. .B -I.
  1193. allows you to control precisely which directories are searched before
  1194. the current one and which are searched after.
  1195. .TP
  1196. .B \-nostdinc
  1197. Do not search the standard system directories for header files.
  1198. Only the directories you have specified with
  1199. .B \-I
  1200. options (and the current directory, if appropriate) are searched.
  1201. .sp
  1202. Between
  1203. .B \-nostdinc
  1204. and
  1205. .BR \-I- ,
  1206. you can eliminate all directories from the search path
  1207. except those you specify.
  1208. .TP
  1209. .B \-M
  1210. Tell the preprocessor to output a rule suitable for
  1211. .BI make (1)
  1212. describing the dependencies of each source file.
  1213. For each source file, the preprocessor outputs one
  1214. .BR make -rule
  1215. whose target is the object file name for that source file and whose
  1216. dependencies are all the files
  1217. .BR #include d
  1218. in it.
  1219. This rule may be a single line or may be continued with
  1220. .B \\\\-newline
  1221. if it is long.
  1222. .sp
  1223. .B \-M
  1224. implies
  1225. .BR \-E .
  1226. .TP
  1227. .B \-MM
  1228. Like
  1229. .B \-M
  1230. but the output mentions only the user-header files included with
  1231. .B #include
  1232. \fB"\fIfile\fB"\fR.
  1233. System header files included with
  1234. .B "#include <\fIfile\fB>"
  1235. are omitted.
  1236. .sp
  1237. .B \-MM
  1238. implies
  1239. .BR \-E .
  1240. .TP
  1241. .BI \-D macro
  1242. Define macro
  1243. .I macro
  1244. with the empty string as its definition.
  1245. .TP
  1246. .BI \-D macro\fR=\fIdefn
  1247. Define macro
  1248. .I macro
  1249. as
  1250. .IR defn .
  1251. .TP
  1252. .BI \-U macro
  1253. Undefine macro
  1254. .IR macro .
  1255. .TP
  1256. .B \-trigraphs
  1257. Support ANSI C trigraphs.
  1258. You don't want to know about this brain-damage.
  1259. The
  1260. .B \-ansi
  1261. option also has this effect.
  1262. .SH FILES
  1263. .ta \w'LIBDIR/gcc-include 'u
  1264. file.c    C source file
  1265. .br
  1266. file.s    assembly language file
  1267. .br
  1268. file.o    object file
  1269. .br
  1270. a.out    link edited output
  1271. .br
  1272. /tmp/cc\(**    temporary files
  1273. .br
  1274. \fILIBDIR\fR/gcc-cpp    preprocessor
  1275. .br
  1276. \fILIBDIR\fR/gcc-cc1    compiler
  1277. .br
  1278. \fILIBDIR\fR/gcc-gnulib    library needed by GCC on some machines
  1279. .br
  1280. /lib/crt[01n].o    start-up routine
  1281. .br
  1282. /lib/libc.a    standard C library, see
  1283. .IR intro (3)
  1284. .br
  1285. /usr/include    standard directory for 
  1286. .B #include
  1287. files
  1288. .br
  1289. \fILIBDIR\fR/gcc-include    standard gcc directory for
  1290. .B #include
  1291. files
  1292. .sp
  1293. .I LIBDIR
  1294. is usually
  1295. .BR /usr/local/lib .
  1296. .SH "SEE ALSO"
  1297. as(1), ld(1), adb(1), dbx(1), sdb(1).
  1298. .SH BUGS
  1299. Bugs should be reported to
  1300. .BR bug-gcc@prep.ai.mit.edu .
  1301. Bugs tend actually to be fixed if they can be isolated, so it is in your
  1302. interest to report them in such a way that they can be easily reproduced.
  1303. .SH COPYING
  1304. Copyright (c) 1988 Free Software Foundation, Inc.
  1305. .P
  1306. Permission is granted to make and distribute verbatim copies of
  1307. this manual provided the copyright notice and this permission notice
  1308. are preserved on all copies.
  1309. .P
  1310. Permission is granted to copy and distribute modified versions of this
  1311. manual under the conditions for verbatim copying, provided that the
  1312. entire resulting derived work is distributed under the terms of a
  1313. permission notice identical to this one.
  1314. .P
  1315. Permission is granted to copy and distribute translations of this
  1316. manual into another language, under the above conditions for modified
  1317. versions, except that this permission notice may be included in
  1318. translations approved by the Free Software Foundation instead of in
  1319. the original English.
  1320. .SH AUTHORS
  1321. See the GNU CC Manual for the contributors to GNU CC.
  1322.